Integrand size = 32, antiderivative size = 107 \[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {2 A \sqrt {a-b} (a+b) \cot (e+f x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a-b}}\right )|\frac {a-b}{a+b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b^2 f} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {4089} \[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {2 A \sqrt {a-b} (a+b) \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a-b}}\right )|\frac {a-b}{a+b}\right )}{b^2 f} \]
[In]
[Out]
Rule 4089
Rubi steps \begin{align*} \text {integral}& = \frac {2 A \sqrt {a-b} (a+b) \cot (e+f x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a-b}}\right )|\frac {a-b}{a+b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b^2 f} \\ \end{align*}
Time = 10.92 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.97 \[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {A (a+b) \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \sec ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {\sec (e+f x)} \left (\sqrt {\frac {\cos (e+f x)}{1+\cos (e+f x)}} E\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1+\sec (e+f x)}-\sqrt {\frac {1}{1+\cos (e+f x)}} \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \sqrt {\sec (e+f x)} \sin (e+f x)\right )}{b f \left (\frac {1}{1+\cos (e+f x)}\right )^{3/2} \sqrt {a+b \sec (e+f x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(564\) vs. \(2(98)=196\).
Time = 21.68 (sec) , antiderivative size = 565, normalized size of antiderivative = 5.28
method | result | size |
default | \(-\frac {2 A \left (\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a \cos \left (f x +e \right )^{2}+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b \cos \left (f x +e \right )^{2}+2 \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a \cos \left (f x +e \right )+2 \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b \cos \left (f x +e \right )+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a +\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b +\cos \left (f x +e \right ) \sin \left (f x +e \right ) a +\sin \left (f x +e \right ) b \right ) \sqrt {a +b \sec \left (f x +e \right )}}{f b \left (b +a \cos \left (f x +e \right )\right ) \left (\cos \left (f x +e \right )+1\right )}\) | \(565\) |
parts | \(\text {Expression too large to display}\) | \(935\) |
[In]
[Out]
\[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { -\frac {{\left (A \sec \left (f x + e\right ) - A\right )} \sec \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=- A \left (\int \left (- \frac {\sec {\left (e + f x \right )}}{\sqrt {a + b \sec {\left (e + f x \right )}}}\right )\, dx + \int \frac {\sec ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sec {\left (e + f x \right )}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { -\frac {{\left (A \sec \left (f x + e\right ) - A\right )} \sec \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { -\frac {{\left (A \sec \left (f x + e\right ) - A\right )} \sec \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sec (e+f x) (A-A \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {A-\frac {A}{\cos \left (e+f\,x\right )}}{\cos \left (e+f\,x\right )\,\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}} \,d x \]
[In]
[Out]